<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue-pdfviewer</title>
    <script src="//unpkg.com/vue@2.5.22/dist/vue.js"></script>
    <script src="//unpkg.com/vue-pdfviewer@1.0.2/index.js"></script>
</head>
<body>
<div id="UApp">
    <template>
        <div>
            <pdfviewer
                    @closepdf="closepdf"
                    v-model="isshowpdf"
                    :pdfurl="pdfUrl"
                    @pdferr="pdferr"
                    :maxscale='4'
                    :minscale='0.6'
                    :scale='1.1'></vueshowpdf>
        </div>
    </template>
</div>
</body>
<script>
    var vueApp = new Vue({
        el: '#UApp',
        // router,
        components: {
            pdfviewer
        },
        mounted() {
            console.log('mounted');
        },
        data() {
            return {
                isshowpdf: false,
                currentPage: 0,
                pageCount: 0,
                pdfUrl: 'https://www.nvidia.com/content/dam/en-zz/zh_cn/Solutions/Data-Center/tesla-v100/volta-v100-datasheet-update-a4-nv-636418-r4-lr.pdf',
            }
        },
        methods: {
            closepdf(){
                this.isshowpdf = false
            },
            pdferr(errurl) {
                console.log(errurl);
            }
        },
    });

    console.log('欢迎查看开发者Vue调试报告');
</script>
</html>
